<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <!--lazy修饰符让input失去焦点或敲回车键时更新数据-->
        <input type="text" v-model.lazy="message">
        <h2>{{message}}</h2>

        <!--number修饰将input输入框类型编程number而不是string类型-->
        <input type="number" v-model.number="num">
        <h2>{{num}} --{{typeof num}}</h2>

        <!--trim修饰符过滤掉input中左右2边空格-->
        <input type="text" v-model.trim="msg">
        <h2>{{msg}}</h2>
    </div>
    <script>

        var app=new Vue({
             el:'#app',
            data:{
                message:'你好，vue',
                num:12,
                msg:"sdfds"
            }
    
        });
    </script>
</body>
</html>